<div id="system-list">
	<h1>Listing systems</h1>
	<% form_for :search do |f| %>
		<p>
			<%= f.label :search, 'Search' %> <br />
			<%= f.text_field params[:search] %>
			<%= submit_tag "Search", :name => nil %>
		</p>
  <% end %>
		<table cellpadding="5" cellspacing="0">
			<tr>
				<td <%= sort_td_class_helper "name"%>>
					<%= sort_link_helper "Name", "name"%>
				</td>
				<td <%= sort_td_class_helper "hd_number"%>>
					<%= sort_link_helper "HD Number", "hd_number"%>
				</td>
				<td <%= sort_td_class_helper "hip_number"%>>
					<%= sort_link_helper "HIPP Number", "hip_number"%>
				</td>
				<td> Number of known planets </td>
			</tr> 
			<% for @system in @systems %>
				<%= render_partial 'system' %>
			<% end %>
		</table>
</div>
<%= will_paginate @systems %>

